using System;
using System.Collections.Generic;
using System.Text;

using SlimDX;
using Barrage.Global;
namespace Barrage.Elements.Cameras
{
    class Scene2DCamera:Camera
    {
        public override Vector3 Position { get { return new Vector3(0, 0, -5); } }
        public Scene2DCamera()
        {
            projection = Matrix.OrthoLH( Engine.DefaultRenderTargetDescription.Width,Engine.DefaultRenderTargetDescription.Height, 0.01f, 1000);
            motion.Matrix = Matrix.LookAtLH(new Vector3(0, 0, -5), Vector3.Zero, Vector3.UnitY);
        }

        public static Vector2 GUIPosition(Vector2 relPos)
        {
            return new Vector2(relPos.X * Engine.DefaultRenderTargetDescription.Width / 2, relPos.Y * Engine.DefaultRenderTargetDescription.Height / 2);
        }
    }
}
